package c.a.md.androidvideo.gles;

import android.content.Context;
import android.opengl.GLSurfaceView;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

/**
 * Created by ytf on 2018/10/24.
 * Description:
 */
public class TriangleRender implements GLSurfaceView.Renderer
{
    private int triangleProgramId;
    private int triangleVerticesId;
    private int triangleColorId;

    private Context context;
    private Triangle mTriangle;

    public TriangleRender()
    {

    }

    @Override
    public void onSurfaceCreated(GL10 gl, EGLConfig config)
    {
        mTriangle = new Triangle();
    }

    @Override
    public void onSurfaceChanged(GL10 gl, int width, int height)
    {

    }

    @Override
    public void onDrawFrame(GL10 gl)
    {
        mTriangle.onDraw();
    }
}
